<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="zh-cn">
<head>
    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="Author" content="">
    <meta content=" " name="">
    <title></title>

    <!--    导入JQUery-->
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>


    <link rel="stylesheet" type="text/css" href="css/css_whir.css"/>
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="js/html5shiv.v3.72.min.js"></script>
    <![endif]--><script type="text/javascript">
    var navID = "5";
    var menuID = "55";
</script>

    <style>
        .text.change::-webkit-input-placeholder {
            color: red;
        }
    </style>




</head>

<body>
<!--top-->
<header class="Top">
    <div class="Topbox">
        <div class="logo"><a href="index"></a></div>
        <!-- <a href="#" target="_blank" class="search"></a>-->
        <nav class="MainNav">
            <ul>
                <li><a id="nav1" class="navA" href="index">首页</a></li>
                <li><a id="nav2" class="navA" href="about">关于安时利</a></li>
                <li><a id="nav3" class="navA" href="product">产品中心</a></li>
                <li><a id="nav4" class="navA" href="jumpnews">新闻中心</a></li>
                <li><a id="nav5" class="navA" href="jumpServiceSupport">服务支持</a></li>
                <li><a id="nav6" class="navA" href="toQueryPatner">合作伙伴</a></li>
                <li><a id="nav7" class="navA" href="recruitment">人才招聘</a></li>
                <li><a id="nav8" th:if="${session.user==null}" class="navA" href="jump">登录</a>
                    <a th:if="${session.user!=null}"
                       id="nav8" class="navA" href="logout">退出</a></li>
                <!--                <li><a id="nav9" class="navA" href="jumpRegister">注册</a></li>-->
            </ul>
        </nav>

        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</header>


<script type="text/javascript">
    //导航选中
    $("#nav" + navID).addClass("onnav");
    $( function(){
        $(".MainNav").find("li:last").css("background","");
    })



</script>
<!--top End-->

<aside class="Banner" style=" background:url(/images/f.jpg) no-repeat top center;"></aside>

<section class="Contain">
    <div class="ContainBox">
        <aside class="SildeBar">
            <nav class="MenuList">
                <div class="menu_title">
                    <span class="col">Service Support</span>
                    <em class="ali">服务支持</em>
                    <div class="location"><a href="#">首页</a> &gt;<a href="jumpServiceSupport">服务支持</a></div>
                </div>
                <div class="Menu">
                    <ul>
                        <li><a id="menu51" href="jumpServiceSupport">ANGY服务</a></li>
                        <li><a id="menu52" href="jumpServiceAddress">服务网点</a></li>
                        <li><a id="menu53" href="jumpRepair">网上报修</a></li>
                        <li><a id="menu54" href="jumptoDataRequest">资料索取</a></li>
                        <li><a id="menu55" href="jumptoComplainSuggest">投诉建议</a></li>
                    </ul>
                </div>
            </nav>
            <script type="text/javascript">
                //菜单选中
                $("#menu" + menuID).addClass("onmenu");
            </script>

        </aside>
        <section class="MainContent">
            <div class="Current">
                <div class="column"><span>投诉建议</span></div>
            </div>
            <div class="Content">
                <div class="message">
                    <!--                    table开始-->
                    <table class="form_table">
                        <tr>
                            <td class="tf"  align="right">
                                <span class="form_err"></span>
                                公司或医院：
                            </td>
                            <td>
                                <input id="companyOrHospital" name="companyOrHospital" type="text" class="text" maxlength="250" value=""  onchange="checkcompanyOrHospital()"/>
                            </td>
                        </tr>
                        <tr>
                            <td  class="tf" align="right">
                                <span class="form_err"></span>
                                联系人：
                            </td>
                            <td>
                                <input id="linkName" name="linkName" type="text" class="text" maxlength="250"  />
                            </td>
                        </tr>
                        <tr>
                            <td class="tf"  align="right">
                                <span class="form_err"></span>
                                联系人电话：
                            </td>
                            <td>
                                <input id="linkPhone" name="linkPhone" type="text" class="text" maxlength="250" value=""   />
                            </td>
                        </tr>
                        <tr>
                            <td  class="tf" align="right">
                                <span class="form_err"></span>
                                电子邮箱：
                            </td>
                            <td>
                                <input id="csemail" name="csemail" type="text" class="text" maxlength="250"  />
                            </td>
                        </tr>
                        <tr>
                            <td  class="tf" align="right" colspan="2" style="width: 120px; ">
                                投诉或建议类容：
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <textarea id="repairTextArea"   name="18160" rows="2" cols="20"  onKeyUp="LimitMaxLength(this)" onblur="LimitMaxLength(this)" onpropertychange="LimitMaxLength(this)"  maxlength="1024" class="text2"  ></textarea>
                                <span name="whirValidator" validatorfor="repairTextArea" required="True" requiredmsg="留言信息为必填" regexp="" errmsg="留言信息验证不通过"></span>
                            </td>
                        </tr>

                        <tr>
                            <td class="left"></td>
                            <td>
                                <input class="btn" id="repairSubit" value="提交" type="button" />
                                <input class="btn" id="reset" value="重置" type="button" />

                            </td>
                        </tr>
                    </table>
                    <!--                    table结束-->

                    <script type="text/javascript">
                        //限制textArea的长度
                        function LimitMaxLength(obj) {
                            var leng = obj.value.length;
                            var len = parseInt($(obj).attr('maxlength'));
                            if (leng > len) {
                                obj.value = obj.value.substr(0, len);
                            }
                        }
                    </script>
                </div>
            </div>
        </section>
        <div class="clear"></div>
    </div>
</section>

<!--bottom-->
<footer class="Bottomer">
    <div class="Bottom">
        <div class="Bottomnav">
            <ul>
                <li><em></em><a class="bt">关于安时利</a>
                    <dl>
                        <dt><a th:href="@{about}">公司概况</a></dt>
                        <dt><a th:href="@{social_responsibility}">社会责任</a></dt>
                        <dt><a th:href="@{sustained_development}">持续发展</a></dt>
                    </dl>
                </li>
                <li><em></em><a class="bt">产品中心</a>
                    <dl>
                        <dt><a th:href="@{product(pc_id=1)}">医学影像产品</a></dt>
                        <dt><a th:href="@{product(pc_id=2)}">心血管产品</a></dt>
                        <dt><a th:href="@{product(pc_id=3)}">超声产品</a></dt>
                        <dt><a th:href="@{product(pc_id=4)}">血管成像仪</a></dt>
                        <dt><a th:href="@{product(pc_id=5)}">疤痕修复产品</a></dt>
                        <dt><a th:href="@{product(pc_id=6)}">负压创伤治疗系统</a></dt>
                        <dt><a th:href="@{product(pc_id=7)}">安格电子直乙结肠镜</a></dt>
                    </dl>
                </li>
                <li><em></em><a class="bt">新闻中心</a>
                    <dl>
                        <dt><a th:href="@{queryNews(n_category=0)}">公司新闻</a></dt>
                        <dt><a th:href="@{queryNews(n_category=1)}">行业新闻</a></dt>
                        <dt><a th:href="@{queryNews(n_category=2)}">学术资讯</a></dt>
                    </dl>
                </li>
                <li><em></em><a class="bt">服务支持</a>
                    <dl>
                        <dt><a th:href="@{jumpServiceSupport}">ANGC服务</a></dt>
                        <dt><a th:href="@{jumpServiceAddress}">服务网点</a></dt>
                        <dt><a th:href="@{jumpRepair}">网上保修</a></dt>
                        <dt><a th:href="@{jumptoDataRequest}">资料索取</a></dt>
                        <dt><a th:href="@{jumptoComplainSuggest}">投诉建议</a></dt>
                    </dl>
                </li>
                <li><em></em><a class="bt">合作伙伴</a>
                    <dl>
                        <dt><a th:href="@{partner}">合作伙伴</a></dt>
                    </dl>
                </li>
                <li><em></em><a class="bt">人才招聘</a>
                    <dl>
                        <dt><a th:href="@{recruitment}">招聘职位</a></dt>
                        <dt><a th:href="@{development}">培养与发展</a></dt>
                        <dt><a th:href="@{salary}">薪酬与福利</a></dt>
                    </dl>
                </li>
            </ul>
        </div>
        <div class="connect">
            <span class="kf">全国客服热线</span>
            <em class="tel">400-000-0004</em>
            <div class="SreachBox">
                <form method="post" action="fuzzy">
                    <input name="n_name" type="text" value="搜索内容" onblur="if(this.value=='')this.value='搜索内容';" onfocus="if(this.value=='搜索内容')this.value='';" />
                    <button class="sreach_btn"><span class="Texthide"></span></button>
                </form>
            </div>
        </div>
    </div>
</footer>
<footer class="BottomRight">
    <div class="Copyright">Copyright © 2015  粤ICP备88888888</div>
</footer>

<script type="text/javascript">
    //整站无图处理
    jQuery.each(jQuery("img"), function (i, n) { jQuery(n).error(function () { n.src = 'images/nopic.jpg'; }); n.src = n.src; });
</script>

<script type="text/javascript">


    <!--    写的ajax提交数据-->
    $("#repairSubit").click(function () {
        //获取公司或医院
       // var companyOrHospital=$("#companyOrHospital").val();
        var companyOrHospital=$("#companyOrHospital").val().trim();
      //  alert("获取公司或医院:"+companyOrHospital+"长度是"+companyOrHospital.length);

        if(companyOrHospital==null || companyOrHospital==''){
            $("input[name='companyOrHospital']").attr("placeholder","公司或医院不能为空");
            $('.text').addClass('text change');
            return;
        }

        $("#companyOrHospital").change( function checkcompanyOrHospital() {
            $("input[name='companyOrHospital']").attr("placeholder","公司或医院不能为空");
            $('.text').addClass('text change');
        });


        //获取联系人
        var linkName=$("#linkName").val().trim();
        if (linkName==null || linkName==''){

            $("input[name='linkName']").attr("placeholder","联系人不能为空");
            $('.text').addClass('text change');
            return;
        }
        //获取联系人电话
        var linkPhone=$("#linkPhone").val().trim();
        if (linkPhone==''){
            $("input[name='linkPhone']").attr("placeholder","联系人电话不能为空");
            $('.text').addClass('text change');
            return ;
        }


        if(/^1[34578]\d{9}$/.test(linkPhone)){
            return true;
        }else{
            $("input[name='linkPhone']").attr("placeholder","手机格式不正确");
            $('.text').addClass('text change');
        }


        //获取电子邮箱
        var csemail=$("#csemail").val().trim();
        // var reg=/^[1-9][0-9]{5}$/;
        // var re = new RegExp(reg);
        // if (!(re.test(dataEmail)))
        // {
        //     $("input[name='zipCode']").attr("placeholder","邮编格式不正确");
        //     return false;
        // }

        if (csemail==''){
            $("input[name='csemail']").attr("placeholder","电子邮箱不能为空");
            $('.text').addClass('text change');
            return;
        }

        //投诉或建议类容
        var repairTextArea=$("#repairTextArea").val().trim();


        $.ajax({
            url:"ToComplaintSuggest",
            type:"post",
            data:{
                "companyOrHospital":companyOrHospital,
                "linkName":linkName,
                "linkPhone":linkPhone,
                "email":csemail,
                "csTitle":repairTextArea,
            },
            success:function (result) {
                if (result=="success"){
                    alert("投诉或建议成功");
                }else {
                    alert("投诉或建议失败");
                }
            }
        })
    });

    <!--    写的ajax提交数据-->

    <!--    重置数据数据开始-->
    $("#reset").click(function () {

        document.location.reload();

    });

    <!--    重置数据数据结束-->







    function GoSearchUrl() {
        var searchinput = document.getElementById("key");
        if (searchinput.value == "" || searchinput.value == "搜索内容") {
            alert("请输入关键字！");
            searchinput.focus();
            return false;
        }
        if (searchinput.value.length > 50) {
            alert("输入的关键字字数不要过多！");
            searchinput.focus();
            return false;
        }
        CheckString(searchinput.value);
    }

    function GoSreach(rs) {
        window.location = "{$syspath}search/search.aspx?key=" + escape(rs);
        return true;
    }

    function entersearch() {
        //alert(dd);
        var event = window.event || arguments.callee.caller.arguments[0];
        if (event.keyCode == 13) {
            GoSearchUrl();
        }
    }

    function CheckString(s) {
        var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）—|{}【】‘；：”“'。，、？]")
        var rs = "";
        for (var i = 0; i < s.length; i++) {
            rs = rs + s.substr(i, 1).replace(pattern, '');
        }
        if (rs == "") {
            alert("不能输入特殊字符！");
            return false;
        }
        else {
            GoSreach(rs);
        }
    }
</script><!--bottom End-->
</body>
</html>